
* use the combined data one for this
* use "_combined.dta", clear

* note that google and cces data came with weights. For mturk, weight==1 for all respondents.

* code here appears in the order the results, including descriptives, are given in the paper




**** DESIGN section
* "Though we preserve Luskin and Bullock�s treatment prompts, we adapt the subsequent knowledge battery to contain items relevant to our other projects. We also toyed with varying whether the interface allowed respondents to skip items (among CCES respondents only) but found so little variation in item non-response across experimental conditions (a difference of X items skipped out of 5, p=X) that we do not detail it here."
reg skipped encourageguess if cces==1
* "In both conditions, two-thirds of respondents answered all 5 items, while 94% answered at least 4."
tab skipped group if cces==1, col





**** RESULTS section
* "Among CCES respondents, X% knew their state had a constitution, X% knew the deficit had grown, X% knew US Senators serve for 6 years, X% identified foreign aid as the federal government�s smallest expenditure, and X% knew the President nominates judges."
tab cor_hasconst if cces==1
tab cor_deficit if cces==1
tab cor_senator if cces==1
tab cor_spending if cces==1
tab cor_scotus if cces==1

* "The mean CCES respondent answered X of 5 items correctly�the same as GS respondents, but lower than the X mean among MTurkers"
sum correct if cces==1
sum correct if google==1
sum correct if mturk==1

* Table 1
reg correct cces google r_male r_dem r_rep r_educ_college i.r_agecat
reg dunno cces google r_male r_dem r_rep r_educ_college i.r_agecat

* "On all platforms, encourage guessing reduces DK responses relative to encourage DK, though the effect is significant only for MTurk (-0.33, p<0.01) respondents. The reduction is -0.14 (p=0.11) for CCES and -0.12 (p=0.21) for GS."
reg dunno encourageguess if mturk==1
reg dunno encourageguess if cces==1
reg dunno encourageguess if google==1
* "For GS, that is almost exactly what we find: An insignificant 0.030 (p=0.75) increase in correct responses under encourage guessing. Curiously, CCES respondents appear to have provided (insignificantly) fewer correct responses under encourage guessing (-0.062, p=0.56). ... On [MTurk] only, encourage guessing raises average scores by 0.30 relative to encourage DK (p<0.01)."
reg correct encourageguess if mturk==1
reg correct encourageguess if cces==1
reg correct encourageguess if google==1

* Figure 1, and all figures in supplement: See the R code file

* "We find no evidence that MTurk respondents were more likely to search for answers online in one condition than in another."
* There is a single nonsense value in ELAPSED of 65,535 seconds. 2nd highest is 3325 seconds. Just delete it:
sum elapsed, d
replace elapsed = . if elapsed > 4000
* due to heavy skew, create a log version
gen lnelapsed = ln( elapsed+1 )
* visualize the difference to see there is nothing there:
twoway ( kdensity lnelapsed if encourageguess==0 ) ( kdensity lnelapsed if encourageguess==1 ) if mturk==1
* the part reported in the text:
by encourageguess, sort: sum elapsed if mturk==1, d
ttest elapsed if mturk==1, by( encourageguess )
ttest lnelapsed if mturk==1, by( encourageguess )

* In footnote: "As a check on these results, we investigated whether women and men behaved differently with respect to the treatments, following Pietryka and MacIntosh (2013). Though gender affects responses generally (see Table 1), it did not interact with our treatment on any platform, with p-values consistently above 0.3."
reg dunno encourageguess##r_male if cces==1
reg dunno encourageguess##r_male if google==1
reg dunno encourageguess##r_male if mturk==1
* and then correct responses:
reg correct encourageguess##r_male if cces==1
reg correct encourageguess##r_male if google==1
reg correct encourageguess##r_male if mturk==1





**** SUPPLEMENTAL APPENDIX

* table A1. Check whether randomization "worked" unweighted
probit encouragedunno r_male r_dem r_rep r_educ_college i.r_agecat if cces==1
probit encouragedunno r_male r_dem r_rep r_educ_college i.r_agecat if google==1
probit encouragedunno r_male r_dem r_rep r_educ_college i.r_agecat if mturk==1
probit encouragedunno r_male r_dem r_rep r_educ_college i.r_agecat
* table A2. same but weighted
probit encouragedunno r_male r_dem r_rep r_educ_college i.r_agecat if cces==1 [pweight=weight]
probit encouragedunno r_male r_dem r_rep r_educ_college i.r_agecat if google==1 [pweight=weight]
probit encouragedunno r_male r_dem r_rep r_educ_college i.r_agecat if mturk==1
probit encouragedunno r_male r_dem r_rep r_educ_college i.r_agecat [pweight=weight]

* table A3 and A4: estimating treatment effects using OLS, with and without controls
gen t_guesscces = cces*encourageguess
gen t_guessgoogle = google*encourageguess
* table A3: unweighted
reg correct encourageguess cces t_guesscces google t_guessgoogle
reg correct encourageguess cces t_guesscces google t_guessgoogle r_male r_dem r_rep r_educ_college i.r_agecat
reg dunno encourageguess cces t_guesscces google t_guessgoogle
reg dunno encourageguess cces t_guesscces google t_guessgoogle r_male r_dem r_rep r_educ_college i.r_agecat
* table A4: weighted
reg correct encourageguess cces t_guesscces google t_guessgoogle [pweight=weight]
reg correct encourageguess cces t_guesscces google t_guessgoogle r_male r_dem r_rep r_educ_college i.r_agecat [pweight=weight]
reg dunno encourageguess cces t_guesscces google t_guessgoogle [pweight=weight]
reg dunno encourageguess cces t_guesscces google t_guessgoogle r_male r_dem r_rep r_educ_college i.r_agecat [pweight=weight]
* table a5: unweighted nbreg
nbreg correct encourageguess cces t_guesscces google t_guessgoogle
nbreg correct encourageguess cces t_guesscces google t_guessgoogle r_male r_dem r_rep r_educ_college i.r_agecat
nbreg dunno encourageguess cces t_guesscces google t_guessgoogle
nbreg dunno encourageguess cces t_guesscces google t_guessgoogle r_male r_dem r_rep r_educ_college i.r_agecat
* table a6: weighted nbreg
nbreg correct encourageguess cces t_guesscces google t_guessgoogle [pweight=weight]
nbreg correct encourageguess cces t_guesscces google t_guessgoogle r_male r_dem r_rep r_educ_college i.r_agecat [pweight=weight]
nbreg dunno encourageguess cces t_guesscces google t_guessgoogle [pweight=weight]
nbreg dunno encourageguess cces t_guesscces google t_guessgoogle r_male r_dem r_rep r_educ_college i.r_agecat [pweight=weight]










